<template>
	<view class="space-between commodity" 
	:style="{borderRadius: '5px',marginBottom:' 15rpx',padding:state=='active'?'0px':'20rpx'}" @click="tab(shoppAll.goods_id)">
		<view class="left_commodity">
			<image :src="shoppAll.goods_image?shoppAll.goods_image:shoppAll.image" mode=""></image>
		</view>
		<view class="right_commodity">
			<view class="title">{{shoppAll.goods_name?shoppAll.goods_name:shoppAll.name}}</view>
			<view class="text">{{shoppAll.goods_subtitle?shoppAll.goods_subtitle:shoppAll.subtitle}}</view>
			<view class="space-between"><text style="max-width:95%">{{shoppAll.dispatch_name?shoppAll.dispatch_name:shoppAll.dispatch_type}}</text></view>
			<view v-if="money=='delivery'" style="color:#666;font-size: 26rpx;">提货数量1件</view>
			<view class="space-between integralTetx" v-else>
				<view><text>{{shoppAll.score}}</text><text>积分</text></view>
				<view v-if="type=='num'">X1</view>
			</view>
		</view>
	</view>
</template>

<script setup lang="ts">
	const props = defineProps({
	  type:{type:String},
	  state:{type:String},
	  shoppAll:{type:Object},
	  money:{type:Object}
	});
	const emit = defineEmits(['tabSubmit']);
	function tab(id){
		emit("tabSubmit",id)
	}
</script>

<style scoped lang="less">
	.integralTetx{
		width: 100%;
		view:nth-of-type(1){
			text{
				font-size:32rpx;
				font-family: PingFangSC-Regular, PingFang SC;
				font-weight: 400;
				color: #1B91FF;
			}
			text:nth-of-type(2){
				font-size:24rpx;
				margin-left: 5rpx;
			}
		}
	    view:nth-of-type(2){
			font-size: 28rpx;
			font-family: PingFangSC-Light, PingFang SC;
			font-weight: 400;
			color: #333333;
		}
	}
	@import url('../groupBenefits/less/shopGrid.less');
</style>